During display of computer graphics, color data stored in memory (e.g., RAM) is typically accessed and processed by a graphics device such as, for example, a graphics interface card, display adaptor, graphics accelerator card, or video card. The bit-format of the color data is a function of the selected color format (e.g., RGB565, RGBA444, etc.) and the color format that is selected is dependent on many different factors, such as graphics hardware use, evolution of additional standards, processing overhead, resolution capabilities, etc. As many different color formats exist, it is not surprising that in many environments conversion between color formats is necessary.
Typically, color data is represented as triplets of red (R), green (G) and blue (B) intensities that in combination generate a spectrum of colors. Each of the red, green, and blue color channels may include a number of designated data-bits associated with them, where the bit-values of the designated data-bits correspond to a respective intensity for each color channel. These data-bits are arranged according to the selected color format and are often stored such that they make up a machine word or codeword on a computer system. For example, the 16-bit RGB565 color format allocates 5-bits for the red channel, 6-bits for the green channel, and 5-bits for the blue channel. The 32-bit RGBA8888 color format allocates 8-bits for each of the red, green, blue and alpha channels, where alpha is typically used to convey additional information such as transparency.
In environments where color format conversion is required, graphics processing devices (e.g., graphics interface card) that support different color formats by converting between them are typically employed. Such color format conversions may, for example, be carried out by software implementations of computer graphics libraries (e.g., OpenGL, OpenGL ES, etc.) or hardware architectures within computer systems and embedded devices. As will be appreciated, as support for converting between different color formats increases, so does the amount of processing overhead in the form of additional software code (e.g., color format conversion functions), hardware (e.g., memory, processor speed), or combination thereof.
Different techniques for addressing graphics processing are known. For example, U.S. Pat. No. 5,815,166 to Baldwin discloses a graphics processing system with a message-passing architecture, in which a rasterizer can be bypassed by a particular type of message from a host. This permits rasterization to be slaved to host downloads and bitmasks, so that images and patterns can be applied to lines and polygons, rather than just rectangles.
U.S. Pat. No. 5,896,136 to Augustin et al. discloses a system and method for blending source pixel color values with destination pixel color values. A computer graphics system is disclosed including a resolution increasing circuit that increases the number of bits in a source alpha value to produce an increased resolution source alpha value. Blending hardware implements a routine according to a blending equation in order to blend the source pixel color values with the destination pixel color values using the increased resolution source alpha value. The resolution increasing circuit includes a squaring circuit that squares the source alpha value.
U.S. Pat. No. 6,522,327 to Deering discloses a decompressor unit having an input FIFO that receives compressed data bits. The FIFO output is provided to an input block state machine and an input block, whose outputs are coupled to a barrel shifter unit. The input block output also is input to Huffman tables that output to the state machine. The state machine output also is coupled to a data path controller whose output is coupled to a tag decoder, and to a normal processor receiving output from the barrel shifter unit. A position/color processor receives output from the barrel shifter unit. Outputs from the normal processor and the position/color processor are multiplexed to a format converter. For instructions in the data stream that generate output to the format converter, the decompression unit generates a tag that is sent to the tag decoder. The decompressed stream of triangle data may then be passed to a traditional rendering pipeline, where it can be processed with full floating point accuracy, and thereafter displayed or otherwise used.
U.S. Pat. No. 6,614,444 to Duluk, Jr. et al. discloses an apparatus and method for rendering 3D graphics images. The apparatus includes a port for receiving commands from a graphics application, an output for sending a rendered image to a display and a fragment-operations pipeline, coupled to the port and to the output. The pipeline includes a stage for performing a fragment operation on an image fragment on a per-pixel basis, as well as a stage for performing a fragment operation on the image fragment on a per-sample basis. The per-pixel basis fragment operation stage comprises one of a scissor-test stage, a stipple-test stage, an alpha-test stage, and a colorest stage. The per-sample basis fragment operation stage comprises one of a Z-test stage, a blending stage and a dithering stage. The apparatus programmatically selects whether to perform a stencil test on a per-pixel basis or a per-sample basis and performs the stencil test on the selected basis. The apparatus also programmatically selects pixel samples for per-sample operations, where the sample selections differ with different instances of the same per-sample operation. The apparatus also programmatically selects a set of subdivisions of a pixel as samples for use in the per-sample fragment operation, programmatically assigns different weights to at least two samples in the set and performs the per-sample basis fragment operation on the image fragment using the programmatically selected and differently weighted samples.
U.S. Pat. No. 6,683,979 to Walker et al. discloses a system, method and apparatus for compressing and decompressing image data. A color cell is compressed by defining at least four luminance levels of the color cell. A bitmask for the color cell is generated with the bitmask having a plurality of entries each corresponding to a respective one of the pixels. Each of the entries stores data identifying one of the luminance levels associated with a corresponding one of the pixels. A first average color of pixels associated with a first one of the luminance levels is calculated and a second average color of pixels associated with a second one of the luminance levels is also calculated. The bitmask in association with the first average color and the second average color are stored. In another embodiment, the color cell is compressed by determining a luminance value for each pixel of the color cell, selecting a maximum luminance value and a minimum luminance value for the color cell, subdividing the interval into at least two approximately equal subintervals, generating at least one bitmask that associates each pixel of the color cell with one subinterval, and determining a representative color value for each subinterval from the pixels of the color cell associated with the subinterval. Compression can be performed at a real-time rate. Compression of luminance, intensity and alpha textures is supported.
U.S. Patent Application Publication No. 2004/0130552 to Duluk, Jr. et al. discloses a deferred shading graphics pipeline processor and method. The processor and method may include one or more of deferred shading, a tiled frame buffer, and multiple stage hidden surface removal processing. In the deferred shading graphics pipeline, hidden surface removal is completed before pixel coloring is done. The pipeline processor comprises a command fetch and decode unit, a geometry unit, a mode extraction unit, a sort unit, a setup unit, a cull unit, a mode injection unit, a fragment unit, a texture unit, a Phong lighting unit, a pixel unit and a backend unit.
Although various techniques for graphics processing exist, improvements in format conversion are desired. It is therefore at least one object of the present invention to provide a novel system and method for color format conversion in a graphics environment.